import { request} from '@/utils/request.util';
import type {Root,DeptListRoot} from '@/types/root'
import type { Pagination } from '@/types/pagination';
import type { Response, Res } from '@/types/common';
import type {FeeTable,FeeTableInfo,FeeDetail} from '@/types/fee'
//收费：查询收费单列表
export const getOrderList =  (
  body:{
    patientName?:string,
    visitDate?:string,
    pageNo:number
    pageSize:number
  }
) => request.get<FeeTable> ("/charge/order/getOrderList", {
  params: body
});  

//收费：查询收费单详情
export const getOrderDetail =  (orderId:string) => request.get<FeeDetail> ("/charge/order/getOrderDetail", {
  params: {orderId}
});  


// 收费：收费
export const doCharge = (body:{
  registerId: any,
  payChannel:string,
  itemIdList:any[]
}) => request.post<Response<Res>>("/charge/order/doCharge", body);


//余额
export const getMemberBalance =  (patientId:any) => request.get<{
  code: string;
  message: string;
  data: {
    balance: number
  }
}> ("/member/getMemberBalance", {
  params: {patientId}
});  



//收费：查询诊所所有的收费列表-缴费右侧用
export const getAllFeeList =  () => request.get<any> ("/project/fee/getAllFeeList",{});  

// 收费：收费：订单收费记录列表
export const getRecordList = (params: any) =>
  request.get<Res<any>>('/charge/order/getRecordList', {params});
